"""
requests的身份验证
使用requests自带的身份验证功能，通过HTTPBasicAuth类实现
"""
import requests
from requests.auth import HTTPBasicAuth

r = requests.get(
    'http://localhost:8080/manager/html',
    auth=HTTPBasicAuth('admin','123456'))
print(r.status_code)